package cn.wolfcode.advice;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice//控制器增强注解
public class ExceptionControllerAdvice {
    @ExceptionHandler(RuntimeException.class)
    public String getException(RuntimeException r, Model model) {
        return "error/404";
    }
}
